Brazil r/s Tutorials 


Enhanced Bump Shadows By: Andrew Harron
INTRODUCTION

We are going to run through a quick how-to on setting up materials using Brazil's Enhanced Bump Shadows feature. First we'll explore what exactly this feature does so we can have a better understanding of what we are going to do.

The Enhanced Bump Shadows feature analyses the bump map of one object when another object casts shadows onto it. When the feature is enabled, shadows being cast onto the object will be shifted based on the bump value and the Affect Shadows amount you can set in the Brazil Utility material.



SCENE SETUP

First, let's create a new scene.

In this scene, we have a wall and a ground object with a pole offset a small way from the wall. Our light is set up to cast shadows from the pole onto the wall, which will have our Enhanced Bump Shadows.



TEXTURING

Now we will begin texturing our scene. A default grey is fine for the ground and the pole since they won't contribute to the effect. For our wall, we want a nice brick pattern so we can easily see how the bump map is affected.

We'll start off by creating a new Brazil Utility material. We use the Brazil Utility material because it contains the enhanced bump map option. Having this option in the Utility material is nice because you can include pre-existing materials in the utility material and you won't have to start from scratch if you have already built your materials. Inside of your Utility material, click on the material and create a new standard material. We use the material slot because we want the bump maps to show up on our object. (**Note: Using the colour slot is usually reserved for self-illuminating objects or for reflection cards because the colour will be 100% self-illuminating. **)

Now we will add a brick map to the diffuse slot of our standard material. I left the brick map with the default settings and tiled it 3 times in both U and V directions. That's all for the diffuse colouring of our material. We can now go back to the root of the Brazil Utility material to add our enhanced bump map.

Under the Bump Mapping section of our Utility material, we see options for the bump map and the Affect Shadows option. First, change your bump amount to 200. In the bump map slot, add a new brick map and change the U and the V scale to the same values as the diffuse map for the material. You will also want to change the colour of the bricks and the mortar so that the shadows will behave correctly. (** Note: If you do not use greyscale values for the bump map, the Enhanced Bump Shadows may not behave correctly since the shadows displace based on the colour value of the bump. **) Set the brick colour to white and set the colour variance and fade to zero. Set the mortar colour to black. The bump map should be ready now.

Go back to the Utility material and check the Affect Shadows checkbox. I set the value to -0.7. Your Utility material settings should look similar to the image below.



RENDERING

If you were to render right now, the image would not use the Enhanced Bump Shadows like the image below.

We need to enable our Enhanced Bump Shadows option in the Luma Server settings, as illustrated below.

If we render the scene again, your image should look like the image below, complete with shadows following the bump map.

Here is a close-up shot of what the enhanced bump shadows look like.

You will notice that where the wall meets the ground, the shadows line up correctly. This is where using black and white for the bump map becomes very important. If the colour of the mortar in the bump map weren't pure black, the shadow on the mortar would not meet up with the shadow on the ground and would look very strange. So as a rule of thumb, where the shadow meets another surface, the bump map should be black.

Try changing the Affect Shadows parameter to 0.7 and look at the results. You will notice that the bump map shifts in the opposite direction.

Here is another image of our scene with a different texture for the wall.

In this close-up, we can see how the shadow cast on the wall does not meet up with the shadow on the floor. This happens because the value of the bump map where the wall and floor meet is not black.

In this last image, I moved the bitmap so that the black portion of the bump map meets with the ground. I also increased the value of the Affect Shadows to emphasize how this feature can help to enhance your images without displacement.

You normally will not need to use too high of a value for your Affect Shadows setting, as the affect will start to look odd if the shadow shifts too much. Finding a good balance between your bump amount and the Affect Shadows amount should take a little bit of time but the overall affect is worth it once you get the hang of it.